package models

type Weather struct {
	ID                  int64   `gorm:"column:id"`
	Serial              string  `gorm:"column:serial"`
	Precipitation       float64 `gorm:"column:precipitation"`
	Temperature         float64 `gorm:"column:temperature"`
	Pressure            float64 `gorm:"column:pressure"`
	Humidity            float64 `gorm:"column:humidity"`
	WindDirection       string  `gorm:"column:windDirection"`
	WindDirectionDegree float64 `gorm:"column:windDirectionDegree"`
	WindSpeed           float64 `gorm:"column:windSpeed"`
	WindScale           string  `gorm:"column:windScale"`
	LastUpdate          string  `gorm:"column:lastUpdate"`
}

type ResultWeather struct {
	Msg  string `json:"msg"`
	Code int    `json:"code"`
	Data Data   `json:"data"`
}

type Location struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	Path string `json:"path"`
}

type Now struct {
	Precipitation       float64 `json:"precipitation"`
	Temperature         float64 `json:"temperature"`
	Pressure            float64 `json:"pressure"`
	Humidity            float64 `json:"humidity"`
	WindDirection       string  `json:"windDirection"`
	WindDirectionDegree float64 `json:"windDirectionDegree"`
	WindSpeed           float64 `json:"windSpeed"`
	WindScale           string  `json:"windScale"`
}

type Data struct {
	Location   Location      `json:"location"`
	Now        Now           `json:"now"`
	Alarm      []interface{} `json:"alarm"`
	LastUpdate string        `json:"lastUpdate"`
}
